<?php slot("ms","mail.ls")?>
<h1 class="title"><?php echo __("Lista de Correos")?></h1>

<table>
  <thead>
    <tr>
      <th>Code</th>
      <th>Title</th>
      <th>Content</th>
      <th>Is active</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($mails as $mail): ?>
    <tr>
      <td><a href="<?php echo url_for('mail/show?code='.$mail->getCode()) ?>"><?php echo $mail->getCode() ?></a></td>
      <td><?php echo $mail->getName() ?></td>
      <td><?php echo $mail->getSubject() ?></td>      
      <td><?php echo $mail->getContent() ?></td>
      <td><?php echo $mail->getIsActive() ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  <a href="<?php echo url_for('mail/new') ?>">New</a>
